<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>1到100求和</title>
	</head>
	<body>
		<script>
			var i=1;
			var sum=0;
			
			while(i<=100){
				sum=sum+i;
				i++;
			}
			alert(sum);
		</script>
	</body>
</html>
